package com.bitcat.servicedemo;

public class TimeUtils {

    // 将毫秒转换成时间格式  几分几秒，如：00：00  如果分钟数小于10，则前面加个0，如果秒数小于10，则前面加个0
    public static String getTime(int time) {
        int minute = time / 1000 / 60;
        int second = time / 1000 % 60;
        String strMinute = minute < 10 ? "0" + minute : minute + "";
        String strSecond = second < 10 ? "0" + second : second + "";
        return strMinute + ":" + strSecond;
    }
}
